package com.billing.model.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.billing.model.entity.CrmCustomer;

public interface CrmCustomerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CrmCustomer record);

    int insertSelective(CrmCustomer record);

    CrmCustomer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CrmCustomer record);

    int updateByPrimaryKey(CrmCustomer record);
    
    List<CrmCustomer> selectCustomerByUserid(String userid);
    
    List<CrmCustomer> selectCustomerByUseridNoBracket(String userid);
  
    int selectCustomerNum(@Param("name")String name,@Param("type")String type,@Param("userid")String userid);
    
    List<CrmCustomer> selectCustomerPage(@Param("name")String name,@Param("userid")String userid,@Param("startRow")int startRow,@Param("pageSize")int pageSize,@Param("type")String type);
    
    CrmCustomer selectByNameAndUserid(@Param("custName")String custName,@Param("userid")String userid);
    
    int countCustomerByMonthAndUserid(@Param("month")String month,@Param("userid")String userid);

	Map<String, Object> selectByKeyword(String keyword);

	List<CrmCustomer> selectAllCustomer(@Param("name")String name,@Param("userid")int userid ,@Param("startRow")int startRow, @Param("pageSize")int pageSize, @Param("type")String type);

	int selectAllCustomerNum(@Param("name")String name,@Param("type")String type,@Param("userid")int userid);
}